import lib.system.mlf.SWFAddress;

var contextPath:String;

// SWFAddress handling
SWFAddress.setStrict(false);
SWFAddress.onChange=function() 
{	
	var value=SWFAddress.getValue();
	var path=SWFAddress.getPath();
	var id=SWFAddress.getParameter("id");

	Packages.model.Context.address.value=value;
	Packages.model.Context.address.path=path;
	Packages.model.Context.address.id=id;
	
	// Packages.log("SceneAgent.loadPath: "+value, "debug");
	// if (value=="") return;
	if (value=="") 
	{
		setDeepLinkingValue("content/Login");
		SWFAddress.setTitle("JumpingNotes: content/Login");
	}
	else 
	{
		Packages.components.SceneAgent.loadPath(value);
		SWFAddress.setTitle("JumpingNotes: "+path);
	}
}

function setDeepLinkingValue(val:String)
{
	SWFAddress.setValue(val);
}